<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
Route::any("/", function () {
    return response()->json(['welcome to api11!']);
});

//登录接口
Route::namespace('Login')->prefix('login')->group(function () {
    require __DIR__ . '/api/login.php';

});

//用户校验
Route::middleware(['api.auth'])->group(function () {

    //用户模块接口
    Route::namespace('Login')->prefix('user')->group(function () {
        require __DIR__ . '/api/user.php';

    });

});
